package cn.itcast.order.client;

import cn.itcast.order.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "userservice",fallback=UserFeignImpl.class)
public interface UserFeign {

//    和user-service中的方法保持一致：参数、调用方式、url、返回结果
        @GetMapping("/user/{id}")
        public User queryById(@PathVariable("id") Long id);

}
